﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace PlusPlusPaint.Tools
{
    abstract class TwoPointTool : StartingPointTool
    {
        #region properties
        protected Nullable<Point> Destination
        {
            get;
            private set;
        }
        #endregion

        public override void HandleMouseDrag(MouseEventArgs mea)
        {
        }

        /// <summary>
        /// Sets the second point when the mouse is released, if it is
        /// not released in the same point.
        /// </summary>
        public override void HandleMouseUp(MouseEventArgs mea)
        {
            this.Destination = mea.Location;
            this.Done = true;
        }
    }
}
